package com.example.thinkpad.androiddemo2.Apater;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.thinkpad.androiddemo2.Model.StudentModel;
import com.example.thinkpad.androiddemo2.R;
import com.example.thinkpad.androiddemo2.StudentViewHolder;

import java.util.List;

/**
 * @author Thinkpad
 * @date 2017/12/4
 */

public class TestAdapter extends BaseQuickAdapter<StudentModel, StudentViewHolder> {


    public TestAdapter(int layoutResId, @Nullable List<StudentModel> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(StudentViewHolder helper, StudentModel item) {

        helper.getTvName().setText(item.getName());

        helper.getTvAge().setText(String.valueOf(item.getAge()));
    }
}
